package com.ruicar.afs.cloud.manage.outer.api.contractcancel.feign;

import com.ruicar.afs.cloud.common.core.log.annotation.SysLog;
import com.ruicar.afs.cloud.common.core.util.IResponse;
import com.ruicar.afs.cloud.manage.outer.api.contractcancel.dto.ContractCancelManageDto;
import com.ruicar.afs.cloud.manage.outer.api.contractcancel.dto.ManageCancelRecordClone;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * <p>Description: </p>
 *
 * @author xudongdong
 * @version 1.0
 * @date create on 2020-07-21 18:54
 */
@FeignClient(name = "cancelForApply", url = "${com.greatwall.services.manage.url}")
public interface CancelForApplyFeign {

    /**
     * 查询合同取消列表数据 多条件
     * @author xudongdong
     * @param dto 操作参数封装
     * @param headers 请求头
     * @return
     */
    @ApiOperation(value = "查询合同取消列表数据")
    @PostMapping("contractCancel/findContractCancelList")
    public IResponse findContractCancelList(@RequestBody ContractCancelManageDto dto, @RequestHeader Map<String, String> headers);

    /**
     * 查询合同取消面详细数据
     * @author xudongdong
     * @param id ID
     * @param headers 请求头
     * @return
     */
    @ApiOperation(value = "查询合同取消面详细数据")
    @PostMapping("contractCancel/findByIdDetails")
    public IResponse findByIdDetails(@RequestParam("id") String id, @RequestHeader Map<String, String> headers);

    /**
     * 删除合同取消业务信息
     * @author xudongdong
     * @param id ID
     * @param headers 请求头
     * @return
     */
    @SysLog("删除合同取消业务信息")
    @ApiOperation(value = "通过id删除")
    @RequestMapping(value = "contractCancel/delById/{id}", method = RequestMethod.DELETE)
    public IResponse<Boolean> delById(@PathVariable(value = "id") String id, @RequestHeader Map<String, String> headers);

    /**
     * 保存合同取消信息
     * @author xudongdong
     * @param dto 操作参数封装
     * @param headers 请求头
     * @return
     */
    @PostMapping("contractCancel/submit")
    @ApiOperation(value = "保存合同取消信息")
    public IResponse<ManageCancelRecordClone> submit(@RequestBody ContractCancelManageDto dto, @RequestHeader Map<String, String> headers);

    /**
     * 提交合同取消业务信息
     * @author xudongdong
     * @param dto 操作参数封装
     * @param headers 请求头
     * @return
     */
    @PostMapping("contractCancel/submitCancelRecord")
    @ApiOperation(value = "提交合同取消业务信息")
    public IResponse submitCancelRecord(@RequestBody ContractCancelManageDto dto, @RequestHeader Map<String, String> headers);
}
